DESCRIPTION = "Auto run Qt demo while system startup"

LICENSE = "CLOSED"

do_configure[noexec] = "1"
do_compile[noexec] = "1"
do_install[nostamp] += "1"

FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += " \
    file://autorun-qtapp.service \
	file://autorun-qtapp.sh \
	file://runQtAppPlatWayland.sh \
"

S = "${WORKDIR}"

INSANE_SKIP_${PN} += "arch"

do_install () {
    install -d ${D}${systemd_system_unitdir}/
    install -m 0755 ${S}/autorun-qtapp.service ${D}${systemd_system_unitdir}/
	install -d ${D}${sysconfdir}/systemd/system/
	ln -sf ../../../lib/systemd/system/autorun-qtapp.service ${D}${sysconfdir}/systemd/system/autorun-qtapp.service
	install -d ${D}${sysconfdir}/init.d/
    install -m 0755 ${S}/autorun-qtapp.sh ${D}${sysconfdir}/init.d/
	install -d ${D}/home/root/
    install -m 0755 ${S}/runQtAppPlatWayland.sh ${D}/home/root/
}

PACKAGES = "${PN}"
RDEPENDS_${PN} += "bash"

FILES_${PN} = " \
        ${systemd_system_unitdir}/autorun-qtapp.service \
        ${sysconfdir}/init.d/autorun-qtapp.sh \
		${sysconfdir}/systemd/system/autorun-qtapp.service \
		/home/root/runQtAppPlatWayland.sh \
"
